// keyof

type Person={
    name:string;
    age:number;
}

type A =keyof Person  // 'name' | 'age'

let a:A='name';

// in
let obj:Person ={name:'周正', age:18}
console.log('age' in obj)